/*
 * Object.h
 *
 *  Created on: Aug 25, 2011
 *      Author: mengwei.chua
 */

#ifndef OBJECT_H_
#define OBJECT_H_

#include <string>
#include <deque>
#include "util/IXmlParsable.h"

#include "Properties.h"
#include "Image.h"

namespace projectcos
{
namespace tile
{
namespace parser
{

class Object : public projectcos::util::IXmlParsable
{
public:
	Object();
	virtual ~Object();

	virtual bool Parse(const TiXmlElement* element);

	std::string GetName() const;
	std::string GetType() const;
	unsigned int GetX() const;
	unsigned int GetY() const;
	unsigned int GetWidth() const;
	unsigned int GetHeight() const;
	unsigned int GetGID() const;
	void GetProperties(Properties& properties) const;
	void GetImages(std::deque<Image>& images) const;

protected:
private:
	std::string m_Name;
	std::string m_Type;
	unsigned int m_X;
	unsigned int m_Y;
	unsigned int m_Width;
	unsigned int m_Height;
	unsigned int m_GID;

	Properties m_Properties;
	std::deque<Image> m_ImageList;
};

} // parser
} // tile
} // projectcos

#endif /* OBJECT_H_ */
